// import styled from "@emotion/styled"
import { observer } from "mobx-react-lite"
import styled from "styled-components"
const Container =styled.div`
   width: 540px;
`

const Button = styled.div``
//解构赋值 {counterStore}
function Counter(){
    return (
        <Container>
            <Button onClick={
                ()=>{
                   this.props. counterStore.addCount()
                }
            }>a</Button>
            <Button> {this.props.counterStore.count}</Button>
            <Button onClick={
                ()=>{
                   this.props. counterStore.decCount()
                }
            }>r</Button>

        </Container>
    )
}
export default  observer(Counter)  